<% layout('/layouts/default.html', {title: '报名商家管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('报名商家管理')}
			</div>
			<div class="box-tools pull-right">
				<!--<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>-->
				<!--<% if(hasPermi('wx:wxBusinessApply:edit')){ %>-->
					<!--<a href="${ctx}/wx/wxBusinessApply/form" class="btn btn-default btnTool" title="${text('新增wx_business_apply')}"><i class="fa fa-plus"></i> ${text('新增')}</a>-->
				<!--<% } %>-->
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${wxBusinessApply}" action="${ctx}/wx/wxBusinessApply/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">${text('商家名称')}：</label>
					<div class="control-inline">
						<#form:input path="name" maxlength="200" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('联系人')}：</label>
					<div class="control-inline">
						<#form:input path="people" maxlength="200" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('联系方式')}：</label>
					<div class="control-inline">
						<#form:input path="phone" maxlength="200" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('商家地址')}：</label>
					<div class="control-inline">
						<#form:input path="address" maxlength="200" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('是否联系')}：</label>
					<div class="control-inline">
						<#form:input path="isRelation" maxlength="11" id="isRelation" class="form-control width-120"/>
					</div>
				</div>
				<!--<div class="form-group">-->
					<!--<label class="control-label">${text('status')}：</labl>-->
					<!--<div class="control-inline width-120">-->x
						<!--<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control"/>-->
					<!--</div>-->
				<!--</div>-->
				<!--<div class="form-group">-->
					<!--<label class="control-label">${text('备注')}：</label>-->
					<!--<div class="control-inline">-->
						<!--<#form:input path="remarks" maxlength="200" class="form-control width-120"/>-->
					<!--</div>-->
				<!--</div>-->
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'${text('商户名称')}', name:'name', index:'a.name', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
			return '<a href="${ctx}/wx/wxBusinessApply/form?id='+row.id+'" class="btnList" data-title="${text('编辑报名商家')}">'+(val||row.id)+'</a>';
		}},
		{header:'${text('联系人')}', name:'people', index:'a.people', width:150, align:"left"},
		{header:'${text('联系方式')}', name:'phone', index:'a.phone', width:150, align:"left"},
		{header:'${text('商户地址')}', name:'address', index:'a.address', width:150, align:"left"},
		{header:'${text('申请时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"},
		{header:'${text('是否联系')}', name:'isRelationText', index:'a.is_relation', width:150, align:"center"},
		// {header:'${text('status')}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
		// 	return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
		// }},
		{header:'${text('备注')}', name:'remarks', index:'a.remarks', width:150, align:"left"},
		{header:'${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
			var actions = [];
			<% if(hasPermi('wx:wxBusinessApply:edit')){ %>
				actions.push('<a href="${ctx}/wx/wxBusinessApply/form?id='+row.id+'" class="btnList" title="${text('编辑报名商家')}"><i class="fa fa-pencil"></i></a>&nbsp;');
				actions.push('<a href="${ctx}/wx/wxBusinessApply/delete?id='+row.id+'" class="btnList" title="${text('删除报名商家')}" data-confirm="${text('确认要删除该报名商家信息吗？')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
			<% } %>
			return actions.join('');
		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});

</script>